import request from '@/utils/request'

// 创建培训结果
export function createTrainingResult(data) {
  return request({
    url: '/biz/training-result/create',
    method: 'post',
    data: data
  })
}

export function selectTrainingResult(query) {
  return request({
    url: '/biz/training-result/selectTrainingResult',
    method: 'get',
    params: query
  })
}

// 更新培训结果
export function updateTrainingResult(data) {
  return request({
    url: '/biz/training-result/update',
    method: 'put',
    data: data
  })
}

// 删除培训结果
export function deleteTrainingResult(id) {
  return request({
    url: '/biz/training-result/delete?id=' + id,
    method: 'delete'
  })
}

// 获得培训结果
export function getTrainingResult(id) {
  return request({
    url: '/biz/training-result/get?id=' + id,
    method: 'get'
  })
}

// 获得培训结果分页
export function getTrainingResultPage(query) {
  return request({
    url: '/biz/training-result/page',
    method: 'get',
    params: query
  })
}

// 导出培训结果 Excel
export function exportTrainingResultExcel(query) {
  return request({
    url: '/biz/training-result/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
